home *** CD-ROM | disk | FTP | other *** search
/ PC World Interactive 7 / PC World Interactive 7.iso / program / cprog.EXE / CC_1.ZIP / UNGETC.C < prev   
Text File  |  1980-01-10  |  384b  |  11 lines

  1. /*
  2. ** push a character back into an input stream
  3. */
  4. #include <streamio.h>
  5.  
  6. ungetc(c, stream) char c; int *stream; {
  7.   if(stream[_IOB_FLAG]&_UNGET) return EOF;
  8.   stream[_IOB_FLAG]=(stream[_IOB_FLAG]&255)|(c<<8)|_UNGET;
  9.   return c&255;
  10.   }
  11.